import xlwings as xw

# app = xw.App(visible=True, add_book=False)
# workbook = app.books.open("d://Temp.xlsx")  # 打开表格
# sheet = workbook.sheets['sheet1']  # 打开sheet1
# workbook.sheets.add('生产统计表')  # 添加sheet
# sheet.range('A1').value = '编号'  # 在A1添加数据
# workbook.save("d://Temp.xlsx")  # 保存表格
# workbook.close()  # 关闭workbook
# app.quit()  # 退出excel 程序

app = xw.App(visible=False, add_book=False)
workbook = app.books.open(r'./Template.xlsx')
sheet = workbook.sheets['sheet1']
sheet.range('A1').value = '编号'
workbook.save("d://Temp2.xlsx")
workbook.close()
app.quit()
